<template>
  <swiper :options="swiperOption" ref="mySwiper">
    <slot></slot>
    <div class="swiper-pagination" slot="pagination"></div>
    <div
      v-show="swiperOption.showNavigation"
      class="swiper-button-prev"
      slot="button-prev"
    ></div>
    <div
      v-show="swiperOption.showNavigation"
      class="swiper-button-next"
      slot="button-next"
    ></div>
  </swiper>
</template>

<script>
// 引入插件和css
import { swiper, swiperSlide } from "vue-awesome-swiper";
import "swiper/dist/css/swiper.css";

export default {
  components: {
    swiper,
    swiperSlide,
  },
  props: {
    swiperOption: Object,
  },
};
</script>
<style scoped lang="less">
.swiper-container {
  position: relative;
  width: 100%;
}
.swiper-container .swiper-slide {
  width: 100%;
  line-height: 200px;
  background: yellowgreen;
  color: #000;
  font-size: 16px;
  text-align: center;
}
</style>